package cn.tedu.springboot.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component
@ConfigurationProperties(prefix = "person")

public class Person {
    @Override
    public String toString() {
        return "person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    /*@Value("${user.username}")*/
    private String name;
   /* @Value("${user.age}")*/
    private Integer age;
    /*@Value("${person.salary}")*/
    private Integer salary;
    /*@Value("${person.like}")*/
    private String like;
    /*@Value("${person.birth}")*/
    private Date birth;

    public Integer getSalary() {
        return salary;
    }

    public void setSalary(Integer salary) {
        this.salary = salary;
    }



    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {

 return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
}
